/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package auborncorpcardealer;

/**
 *
 * @author TQNINH
 */
public class GenericCarTest {
    
    
    public GenericCarTest() {
        
    }
    
    public static void main(String[] args) {
        GenericCar<CarDetail> carDetailObj = new GenericCar<CarDetail>();
        //GenericCar<CarDetail> carDetailObj = new GenericCar<>();
        //Generic JDK 1.7 
        //"Automatic Type Inference during the Generic Instance Creation"
        
        carDetailObj.add(new CarDetail("Qualis", "P001", "Luxury Car",
                "Toyota", new Double(15.95)));
        carDetailObj.add(new CarDetail("Bentley", "P002", "Royal Car",
                "Mercedes Benz", new Double(25.25)));
        carDetailObj.add(new CarDetail("Tucson", "P003", "SUV Car",
                "Hyuandai", new Double(20.00)));
        
        System.out.println("Is the list empty?\t" + carDetailObj.checkEmpty());
        System.out.println("Size of the list:\t" + carDetailObj.getSize());
        System.out.println("Car Details:");
        System.out.println("**************");
        carDetailObj.display();
        System.out.println("\n\nFirst record in the list:\n" + carDetailObj.grab());
    }
}
